﻿using System.Data;
using MyFloridaHouse.libSvDTO;

namespace MyFloridaHouse.DataAccess.Extensions
{
	/// <summary>
	/// RegionDataDTODataContract
	/// </summary>
    class RegionDataDTODataContract
    {
		/// <summary>
		/// DataContract.
		/// </summary>
		/// <param name="rdr">The RDR.</param>
		/// <returns><see cref="RegionDataDTO"/></returns>
        public static RegionDataDTO DataContract(IDataReader rdr)
        {
            var newItem = new RegionDataDTO
                          	{
                          		sourceLayerID = (int) rdr["sourceLayerID"],
                          		dictionaryID = (int) rdr["dictionaryID"],
                          		regionID = (int) rdr["regionID"],
                          		dataValue = rdr["dataValue"].ToString()
                          	};
								//fieldName = rdr["fieldName"].ToString(),
								//layerID = (int)rdr["layerID"],
           return newItem;
        }


    }
}
